
function sivamtime() {
  var now = new Date();
  var hour = now.getHours();
  var min = now.getMinutes();
  var sec = now.getSeconds();
  var day = now.getDay();
  var month = now.getMonth();
  var year = now.getFullYear();
  
  

	if (min<=9)  { min="0"+min; }
	if (sec<=9)  { sec="0"+sec; }
	if (hour>12) { hour=hour-12; add="pm"; }
	else { hour=hour; add="am"; }
	if (hour==12) { add="pm"; }

    var str_clock = ((day<=9) ? "0"+day : day) + "/" + ((month<=9) ? "0"+month : month)+ "/" + ((year<=9) ? "0"+year : year) + " " + ((hour<=9) ? "0"+hour : hour) + ":" + min + ":" + sec + " " + add;    

    //setTimeout("sivamtime()", 1000);
    return str_clock;
}
//window.onload = sivamtime;